Problem Note 41854: Unable to use string timestamp literals with the SQL Native Client 10.0 driver
The following error can occur when you set a timestamp using literal values in SAS/ACCESS® Interface to ODBC and you are using Microsoft SQL Server Native client:
[Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when
converting date and/or time from character string.
With the Microsoft SQL Server Native Driver, the datetime literal value is cast to a DATETIME2 with the following format:
yyyy-mm-dd hh:mm:ss[.9999999]
This level of precision might be more than what is passed in the literal timestamp string. If this amount of precision is required, you can specify the DATETIME2 scale either in a LIBNAME statement or in a DATA statement, as shown in the following examples:
LIBNAME Statement
libname myconn odbc dsn=DSN-name user=user-id password=password datetime2=yes;
DATA Statement
data myconn.mydata (datetime2=yes);
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to ODBC | Windows 7 Professional 32 bit | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Windows 7 Enterprise x64 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows Server 2008 for x64 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows XP Professional | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Windows 7 Enterprise 32 bit | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows Server 2008 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows Server 2003 for x64 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Standard Edition | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Enterprise Edition | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Datacenter Edition | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft® Windows® for x64 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows XP 64-bit Edition | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Windows 7 Professional x64 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Windows 7 Ultimate 32 bit | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Windows 7 Ultimate x64 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Windows Vista | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
Windows Vista for x64 | 9.21_M2 | 9.3 | 9.2 TS2M3 | 9.3 TS1M1 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Topic: | Data Management ==> Data Sources ==> External Databases ==> ODBC (Open Database Connectivity)
|
Date Modified: | 2011-06-07 10:45:28 |
Date Created: | 2010-12-14 17:01:06 |